class Photo < ActiveRecord::Base
  belongs_to :test
  
  has_attached_file :data,
	    :url => "/uploads/:style_:basename.:extension",
	    :styles => {:thumb => "50x50#", :large => "640x480#"}
	  validates_attachment_presence :data
	  validates_attachment_content_type :data,
	    :content_type => ['image/jpeg', 'image/jpg', 'image/png']
end
